 #include <nl_types.h> 
 #include <locale.h> 
 #include <stdio.h> 

 #define CATALOG_NAME "catgets-hello.cat"

 int main (int argc, char *argv[]) 
 { 
    nl_catd catd; 
    setlocale (LC_ALL, ""); 
    printf ("LC_MESSAGES = %s\n", setlocale (LC_MESSAGES, NULL)); 

    catd = catopen (CATALOG_NAME, NL_CAT_LOCALE); 
    if(catd == (nl_catd) -1) { 
        perror("catopen"); 
        return 1; 
    } 

    int set_no=11; 
    int msg_id=14; 
    printf("%s\n", catgets (catd, set_no, msg_id, "Are you OK?")); 

    if(catclose(catd) < 0) { 
        perror ("catclose"); 
        return 1; 
    } 

    return 0; 
 } 
